package com.elder.business.mapper;

import java.util.List;
import com.elder.business.domain.RetreatRecords;
import org.apache.ibatis.annotations.Param;

/**
 * 老人退住Mapper接口
 * 
 * @author elder
 * @date 2023-11-26
 */
public interface RetreatRecordsMapper 
{
    /**
     * 查询老人退住
     * 
     * @param id 老人退住主键
     * @return 老人退住
     */
    public RetreatRecords selectRetreatRecordsById(Long id);

    /**
     * 查询老人退住列表
     * 
     * @param retreatRecords 老人退住
     * @return 老人退住集合
     */
    public List<RetreatRecords> selectRetreatRecordsList(RetreatRecords retreatRecords);

    /**
     * 新增老人退住
     * 
     * @param retreatRecords 老人退住
     * @return 结果
     */
    public int insertRetreatRecords(RetreatRecords retreatRecords);

    /**
     * 修改老人退住
     * 
     * @param retreatRecords 老人退住
     * @return 结果
     */
    public int updateRetreatRecords(RetreatRecords retreatRecords);

    /**
     * 删除老人退住
     * 
     * @param id 老人退住主键
     * @return 结果
     */
    public int deleteRetreatRecordsById(Long id);

    /**
     * 批量删除老人退住
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteRetreatRecordsByIds(Long[] ids);

    List<RetreatRecords> getRetreatRecordsList(@Param("elderIds") List<Long> elderIds,@Param("applyStatus") Integer applyStatus,@Param("startTime") Long startTime,@Param("endTime") Long endTime);

    int upRetreatRecordsById(Long[] ids);

    Integer updateEgressRegisterApprove(@Param("id") Long id,@Param("status") Integer status);

    List<RetreatRecords> getRetreatTodayCount(@Param("startTime") Long startTime,@Param("endTime") Long endTime);
}
